package test_gui01;


import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

import java.util.*;
import java.util.Timer;
import java.text.*;
public class code extends JFrame implements ActionListener
{
  JLabel label;
  SimpleDateFormat sdf = new SimpleDateFormat( "dd MMM yyyy hh:mm:ss" );
  public code()
  {
    super( "Time Frame" );
    setSize( 500, 500 );
    label = new JLabel( sdf.format( new GregorianCalendar().getTime() ) );
    label.setHorizontalAlignment( JLabel.RIGHT );
    Container cont = getContentPane();
    cont.add( label, BorderLayout.SOUTH );
    Timer timer = new Timer( );
    ((Object) timer).start();
  }
  public void actionPerformed( ActionEvent ae )
  {
    label.setText( sdf.format( new GregorianCalendar().getTime() ) );
  }
  public static void main(String[] args) 
  {
    code tf = new code();
    tf.setVisible( true );
  }
}